<%--
  Created by IntelliJ IDEA.
  User: 17722
  Date: 2024/4/27
  Time: 17:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>智慧身份服务平台</title>
    <style>
        body {
            background-image: url(https://sso.cqu.edu.cn/linkid/api/image/download/168923388199020230713135506.jpg);
            background-size: cover;
            background-position: left bottom;
        }
    </style>
</head>
<body>
<h1>注销登出成功。</h1>
<p><span id="countdown">5秒之后自动跳转到</span><a id="hyperlink" href="${pageContext.request.contextPath}/">登录页面</a>。</p>
</body>
<script>
    let countdown = 5;
    const countdownElement = document.getElementById('countdown');
    const hyperlinkElement = document.getElementById('hyperlink');
    const loginUrl = hyperlinkElement.href;
    const timer = setInterval(function() {
        countdown--;
        countdownElement.textContent = countdown + '秒之后自动跳转到';
        if (countdown <= 0) {
            clearInterval(timer);
            window.location.href = loginUrl;
            if (countdown < 0) {
                countdownElement.textContent = '如果没有跳转，请手动点击链接';
            }
        }
    }, 1000);
</script>
</html>
